package com.yidong.laidian.laidian.service.impl;

import com.yidong.laidian.laidian.dao.UsersDAO;
import com.yidong.laidian.laidian.dataobject.UsersDO;
import com.yidong.laidian.laidian.service.UserService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
@RequiredArgsConstructor
public class UserServiceImpl implements UserService {

    private final UsersDAO usersDAO;

    @Override
    public UsersDO save(UsersDO usersDO) {
        return usersDAO.save(usersDO);
    }

    @Override
    public List<UsersDO> getUserList() {
        //查询users表的全部数据
        return usersDAO.findAll();
    }
}
